import Vue from 'vue'//引入路由
import Router from 'vue-router'//引入vue-router
import Login from '../views/Login.vue'
import grade from '../views/grade.vue'
import status from '../views/status.vue'
import Home from '../views/Home.vue'
import register from '../views/register.vue'
import statistics from '../views/statistics.vue'
import population from '../views/population.vue'
import personal from '../views/personal.vue'

Vue.use(Router)//全局使用Router

export default new Router({
  mode: 'history',
  routes: [//配置路由
    {
      path: '/',//链接路径
      name: 'Login',//路由名称
      component: Login,
      hidden: true
    },
    {
      path: '/Home',
      name: '导航1',
      component: Home,
      children: [
        {
          path: '/register',
          name: '注册填写',
          component: register
        },
        {
          path: '/grade',
          name: '成绩填写',
          component: grade
        },
        {
          path: '/status',
          name: '学籍更改',
          component: status
        },
        {
          path: '/statistics',
          name: '资料统计',
          component: statistics
        },
        {
          path: '/population',
          name: '人数统计',
          component: population
        },
        {
          path: '/personal',
          name: '个人情况查询',
          component: personal
        }
      ]
    }
  ]
})
